package cn.com.pc.content.domain;

/**
 * 内容业务
 */
public enum Biz {

    CMS("cms", "采编发系统"),
    PGC("pgc", "麻雀系统"),
    HM("hm", "行家系统"),
    NBABY("nbaby", "新快妈系统"),
    PRS("prs", "推荐系统");


    private String name;
    private String fullname;

    Biz(String name, String fullname) {
        this.name = name;
        this.fullname = fullname;
    }

//    @JsonCreator
    public static Biz getSourceByName(String name){
        for(Biz biz : values()){
            if(biz.getName().equals(name)){
                return biz;
            }
        }
        return null;
    }

//    @JsonValue
    public String getName() {
        return name;
    }

    public String getFullname() {
        return fullname;
    }
}
